package com.pengshun.modules.api.user.service.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.pengshun.modules.api.coal.validator.Fifth;
import com.pengshun.modules.api.coal.validator.First;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

import javax.persistence.*;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * 实名认证,资料提交完毕后status设置为DOING，不可再编辑资料
 * 未通过审核status设置为INVALID，可以再次编辑资料提交审核
 */

@Data
public class CitizenDto implements Serializable {

    private static final long serialVersionUID = 6848628578484886700L;

    private Long id;

    private Long userId;

    @NotNull(message = "name不能为空", groups = {First.class,Fifth.class})
    @Length(max = 20,message = "姓名长度不能超过20", groups = {First.class})
    private String name;

    @NotNull(message = "idCardNum不能为空", groups = {First.class,Fifth.class})
    @Length(max = 18,message = "身份证不能超过18位", groups = {First.class})
    private String idCardNum;

    @NotNull(message = "idCardFrontImg不能为空", groups = {Fifth.class})
    private String idCardFrontImg;

    @NotNull(message = "idCardBackImg不能为空", groups = {Fifth.class})
    private String idCardBackImg;

    private Date expireDate;

    private Integer reviewStatus;

    private String comments;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
    private Date applyDate;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
    private Date reviewDate;

    private String reviewerUserName;

    private Long reviewerUserId;

    /** 认证类型(0身份认证,1司机认证,2车主,3商户)   */
    private Integer type;

}


